home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / opint102.5rc / D_NODEL.PAS < prev    next >
Pascal/Delphi Source File  |  1988-12-04  |  3KB  |  77 lines

  1. Program DemoNodelist;
  2.  
  3.   {***************************************************************************}
  4.   {*                                                                         *}
  5.   {* O p u s   I n t e r f a c e    V e r   1.02     Demo Program.           *}
  6.   {*                                                                         *}
  7.   {* Opus V 1.0x Interface for Turbo Pascal Ver 4.0                          *}
  8.   {*                                                                         *}
  9.   {*  These Structures,Procedures and Functions may help you to make OPUS    *}
  10.   {* utilities for to help other SysOps, Please read the Documentation.      *}
  11.   {*                                                                         *}
  12.   {*  Regards                                                                *}
  13.   {*    Per Holm                                                             *}
  14.   {*                                                                         *}
  15.   {*   FIDO: Per Holm - Asgaard BBS 2:230/22.0                               *}
  16.   {*   UUCP: perholm@daimi.DK                                                *}
  17.   {*                                                                         *}
  18.   {***************************************************************************}
  19.  
  20.  
  21. Uses
  22.   OpInt;
  23.  
  24. PROCEDURE ChkError;
  25.  
  26.   VAR
  27.     Err: Integer;
  28.  
  29.   BEGIN
  30.     Err:=OpIntERROR;
  31.     IF Err>0 THEN
  32.       BEGIN
  33.         Writeln('You Got Yourself an Error ',Err,' During OpInt Access');
  34.         Readln;
  35.       END;
  36.   END;
  37.  
  38. PROCEDURE ChkNode5;
  39.  
  40.   VAR
  41.     l: LongInt;
  42.     N:_Node;
  43.  
  44.   BEGIN
  45.     l:=FindNode('Nodelist.Idx',505,22);    { Find last entry for node 505/22 }
  46.     ReadNode('Nodelist.Sys',N,l);          { Read the information }
  47.     Writeln('BoardName .... : ',N.Name);
  48.     Writeln('Phone ........ : ',N.Phone);
  49.     Writeln('Password ..... : ',N.Password);
  50.     N.Password:='YOYO';                    { Change the password }
  51.     WriteNode('Nodelist.Sys',N,l);         { Update the nodelist }
  52.   END;
  53.  
  54. PROCEDURE ChkNode6;
  55.  
  56.   VAR
  57.     l: LongInt;
  58.     N:_NewNode;
  59.  
  60.   BEGIN
  61.     l:=NumberOfNodes('Nodelist.Idx');     { Get the numbers of nodes in the NL}
  62.     ReadNewNode('Nodelist.Dat',N,l);      { Read the last record in the NL }
  63.     Writeln('BoardName .... : ',N.Name);
  64.     Writeln('Phone ........ : ',N.Phone);
  65.     Writeln('Password ..... : ',N.Password);
  66.     N.Password:='NONO';
  67.     N.Number:=9999;
  68.     WriteNewNode('Nodelist.sys',N,l+1);   { Add a new record to the nodelist }
  69.   END;
  70.  
  71. BEGIN
  72.   ChkNode5;
  73.   ReadLn;
  74.   ChkNode6;
  75.   readln;
  76. END.
  77.